home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / CarbonizedMenus / headers / MenuList.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-26  |  1.3 KB  |  60 lines  |  [TEXT/CWIE]

  1. /****************************************************************************************
  2.     MenuList.h
  3.     
  4.     Copyright © 1999 Red Shed Software. All rights reserved.
  5.     by Jonathan 'Wolf' Rentzsch (jon@redshed.net)
  6.     
  7.     Commenter    Date                Comment
  8.     ---------    -----------------    -----------------------------------------------------
  9.     wolf        Fri, Jun 25, 1999    Created.
  10.     
  11.     ************************************************************************************/
  12.  
  13. #ifndef        _MenuList_
  14. #define        _MenuList_
  15.  
  16. #include    "begin_extern_c.h"
  17.  
  18. /*    From Inside Macintosh Volume I:
  19.     Bytes    Contents
  20.     2        Offset from beginning of menu list to last menu handle.
  21.             (the number of menus in the list times 6)
  22.     2        Horizontal coordinate of right edge of menu title of last menu in list.
  23.     2        not used
  24.  
  25.     For each menu:
  26.  
  27.     4        Menu Handle
  28.     2        Horizontal coordinate of left edge of menu */
  29.  
  30. #pragma options align=mac68k
  31. typedef    struct    {
  32.     MenuHandle    menu;
  33.     UInt16        leftEdge;
  34. }    MenuListItem;
  35.  
  36. typedef    struct    {
  37.     UInt16            menuCount;    //    divide by six
  38.     UInt16            rightEdge;
  39.     UInt16            reserved;
  40.     MenuListItem    menus[ 1 ];
  41. }    MenuListRec, *MenuListPtr, **MenuListHandle;
  42. #pragma options align=reset
  43.  
  44.     extern
  45.     MenuListHandle
  46. GetMenuList();
  47.  
  48.     extern
  49.     MenuListHandle
  50. GetCurrentMenuList();
  51.  
  52.     extern
  53.     bool
  54. ExtractMenuIcon(
  55.     MenuHandle    menu,
  56.     Handle        &iconSuite );
  57.  
  58. #include    "end_extern_c.h"
  59.  
  60. #endif    //    _MenuList_